Skip to content

Account setup: restore Apple OAuth and responsive provider-first layout - #1887

Merged
BigSimmo merged 8 commits into
mainfrom
codex/chat-account-setup-elevate-account-setup-elevate-20260813
Aug 12, 2026
Merged

Account setup: restore Apple OAuth and responsive provider-first layout#1887
BigSimmo merged 8 commits into
mainfrom
codex/chat-account-setup-elevate-account-setup-elevate-20260813

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rebuild the account setup dialog as a provider-first responsive surface.
  • Add Apple OAuth beside Google and Microsoft in the account dialog, reusable auth panel, and settings.
  • Replace the uneven storage cards with a compact account/device disclosure and lightweight PHI footer.
  • Document Apple Services ID setup, callback allowlisting, secret handling, and six-month rotation.

Verification

  • npm run format
  • npm run lint
  • npm run typecheck
  • npm run build
  • npm run check:rag:fixtures — 36 golden cases / 23 suites
  • Focused auth DOM — 24/24
  • Targeted Chromium account-setup journeys — 2/2
  • Design-system contract
  • Isolated PDF virtualization rerun — 9/9

Verification not run: full npm run verify:pr-local did not complete because the full Vitest stage reproduced unrelated Windows-only pr-handoff-stop failures on a clean current-main checkout; all earlier selected checks passed, and the not-reached build/RAG checks were run separately and passed.

UI verification not run: the full npm run verify:ui suite was not repeated locally because focused desktop/phone Chromium journeys and manual 1280×900, 390×820, and 320×700 inspection covered the changed owner; hosted Production UI critical and all three Production UI lanes passed on the exact PR head.

Live Apple/provider-backed authentication was not run because it would require external Apple Developer and Supabase provider configuration not authorized by this code-only change.

Risk and rollout

  • Risk: medium; this changes signed-out authentication entry surfaces and enables the Apple provider path, while preserving existing Google, Microsoft, email magic-link, session, callback, and storage behavior.
  • Rollback: revert this PR; no schema or production provider configuration is changed by the code.
  • Provider or production effects: none. Apple Developer and live Supabase provider activation remain operator-managed and were not changed.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked; this change does not alter clinical decision-support behavior

Notes

  • The sole hosted red job on the exact head is Lighthouse budget (advisory); required Build, static, unit coverage, migration, safety/config, Production UI critical, Production UI 1/2/3, SAST, secret scan, and PR required all passed.
  • CodeRabbit was rate-limited and supplied no findings. The scoped local review found no P0–P2 defects and GitHub reports no review threads.

@supabase

supabase Bot commented Aug 12, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Apple OAuth is enabled across the shared provider type, account setup, authentication panels, settings, documentation, and tests. Authentication actions now expose provider-specific pending states and prevent concurrent submissions. Account setup content and responsive provider layouts were updated.

Changes

Apple OAuth enablement

Layer / File(s) Summary
Provider contract and setup documentation
src/lib/supabase/client.tsx, docs/multi-user-auth-setup.md, docs/disaster-recovery-runbook.md, src/app/auth/callback/route.ts, docs/branch-review-ledger.md
The OAuth provider type and callback documentation include Apple. Setup, recovery, secret rotation, staging verification, and review-ledger records were updated.
Account setup provider flow
src/components/clinical-dashboard/account-setup-dialog.tsx
The dialog supports Apple, Google, and Microsoft OAuth actions, blocks concurrent authentication, shows provider-specific pending states, and updates storage messaging and responsive layout.
Authentication surface integration
src/components/clinical-dashboard/auth-panel.tsx, src/components/clinical-dashboard/settings-dialog.tsx
The auth panel and settings dialog use typed provider identifiers, shared busy-state protection, pending indicators, and actionable Apple OAuth controls.
Authentication and layout validation
tests/auth-panel-product-truth.dom.test.tsx, tests/favourites-auth-gate.dom.test.tsx, tests/settings-dialog-actions.dom.test.tsx, tests/ui-smoke.spec.ts
Tests verify Apple OAuth invocation, enabled provider controls, concurrent-action locking, revised copy, and desktop and mobile layouts.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: ⚪ Minimal · up to c5544

The PR adds responsive account-setup width values that should follow shared design tokens, but this is a localized maintainability issue; no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AuthPanel
  participant SupabaseAuthClient
  participant OAuthProvider
  User->>AuthPanel: Select Apple, Google, or Microsoft
  AuthPanel->>SupabaseAuthClient: signInWithOAuth(providerId)
  SupabaseAuthClient->>OAuthProvider: Start OAuth authorization
  OAuthProvider-->>SupabaseAuthClient: Return through /auth/callback
  SupabaseAuthClient-->>AuthPanel: Complete authentication
Loading

Possibly related PRs

Suggested reviewers: claude, cursoragent

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: restoring Apple OAuth and rebuilding the account setup layout for responsive provider-first behavior.
Description check ✅ Passed The description covers the change scope, verification results, limitations, risks, and rollback, but omits the template's Clinical Governance Preflight and Notes sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/chat-account-setup-elevate-account-setup-elevate-20260813

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 12, 2026 21:17
@BigSimmo
BigSimmo disabled auto-merge August 12, 2026 21:25
@BigSimmo
BigSimmo enabled auto-merge August 12, 2026 21:25

Copy link
Copy Markdown
Owner Author

@claude This PR is currently mergeable_state: dirty against current main at head 3d95bff8d74e673ab64dcab9869025cb7982131f, with no unresolved review threads. Fetch current main and merge it into this PR branch without rebasing or force-pushing. Resolve only merge conflicts, preserving the verified provider-first account layout, Apple OAuth wiring, and all newer main auth changes. Run conflict-adjacent format/typecheck plus focused auth DOM/account-setup browser tests, push the merge-resolution commit, and report the pushed SHA and verification. Do not merge or close the PR, call live OAuth/provider services, deploy, alter auto-merge, or broaden scope.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @BigSimmo — thanks for the @claude mention.

Open this in Claude Code on the web to continue here: https://claude.ai/code

Context: BigSimmo/Database · #1887

Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch.

@claude

claude Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

…at-account-setup-elevate-account-setup-elevate-20260813
@BigSimmo
BigSimmo disabled auto-merge August 12, 2026 21:50
@BigSimmo
BigSimmo enabled auto-merge August 12, 2026 21:52
…at-account-setup-elevate-account-setup-elevate-20260813
@BigSimmo
BigSimmo disabled auto-merge August 12, 2026 22:05
@BigSimmo
BigSimmo enabled auto-merge August 12, 2026 22:07
…at-account-setup-elevate-account-setup-elevate-20260813

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/components/clinical-dashboard/account-setup-dialog.tsx (1)

105-108: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace the new arbitrary width values with theme tokens.

Lines 105 and 108 add sm:max-w-[44rem] and max-w-[38rem]. Define reusable layout tokens in src/app/globals.css, or use the repository component CSS, before applying them here.

As per coding guidelines: “Use Tailwind 4 @theme tokens in src/app/globals.css and the repository's intentionally unlayered component CSS rather than introducing hardcoded design values.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/clinical-dashboard/account-setup-dialog.tsx` around lines 105
- 108, Replace the arbitrary max-width values on the account setup dialog and
form with reusable theme tokens. Define the required width tokens in the
existing theme/component styling system, then reference those tokens in the
`contentClassName` and form `className` while preserving the current responsive
sizing behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/components/clinical-dashboard/account-setup-dialog.tsx`:
- Around line 105-108: Replace the arbitrary max-width values on the account
setup dialog and form with reusable theme tokens. Define the required width
tokens in the existing theme/component styling system, then reference those
tokens in the `contentClassName` and form `className` while preserving the
current responsive sizing behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e5d1171-4157-45e8-a531-37ebfdfd77c2

📥 Commits

Reviewing files that changed from the base of the PR and between 18cb688 and c554407.

📒 Files selected for processing (12)
  • docs/branch-review-ledger.md
  • docs/disaster-recovery-runbook.md
  • docs/multi-user-auth-setup.md
  • src/app/auth/callback/route.ts
  • src/components/clinical-dashboard/account-setup-dialog.tsx
  • src/components/clinical-dashboard/auth-panel.tsx
  • src/components/clinical-dashboard/settings-dialog.tsx
  • src/lib/supabase/client.tsx
  • tests/auth-panel-product-truth.dom.test.tsx
  • tests/favourites-auth-gate.dom.test.tsx
  • tests/settings-dialog-actions.dom.test.tsx
  • tests/ui-smoke.spec.ts

@BigSimmo
BigSimmo merged commit 2e4a88b into main Aug 12, 2026
32 of 35 checks passed
@BigSimmo
BigSimmo deleted the codex/chat-account-setup-elevate-account-setup-elevate-20260813 branch August 12, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant